Skip to content

feat: root to agent upsert key rpc - #243

Merged
fabenan-f merged 3 commits into
mainfrom
feat/agents-upsert-keys-rpc
Sep 16, 2026
Merged

fabenan-f merged 3 commits into
mainfrom
feat/agents-upsert-keys-rpc

Conversation

@fabenan-f

Copy link
Copy Markdown
Contributor

This introduces a new krypton.v1.agents.keys.KeyService for root→agent key pushes with idempotent UpsertKey.

Signed-off-by: fabenan-f <63860771+fabenan-f@users.noreply.github.com>
@fabenan-f fabenan-f self-assigned this Sep 15, 2026
@coderabbitai

This comment was marked as spam.

Signed-off-by: fabenan-f <63860771+fabenan-f@users.noreply.github.com>
@fabenan-f
fabenan-f marked this pull request as ready for review September 15, 2026 15:10
@fabenan-f
fabenan-f requested review from NamanBalaji, apatsap and jithinkunjachan and removed request for NamanBalaji and apatsap September 15, 2026 15:10

@jithinkunjachan jithinkunjachan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes except for one change

Comment thread pkg/store/sql/migrate.go

UNIQUE (tenant_id, name),
UNIQUE (tenant_id, id),
FOREIGN KEY (tenant_id, parent_id) REFERENCES keys(tenant_id, id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we remove only remove this constraints for agents

Comment thread pkg/store/sql/key.go
stmt := `
INSERT INTO keys (id, tenant_id, kind, name, parent_id, managed_by, labels, life_cycle_state, processing_status, processing_job_id, created_at, updated_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
-- keeps the enclosing transaction alive on conflict so callers can reconcile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@apatsap apatsap left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found one small thing

Comment thread pkg/api/v1/proto/agents/keys/errmap.go Outdated
Signed-off-by: fabenan-f <63860771+fabenan-f@users.noreply.github.com>
@fabenan-f
fabenan-f merged commit f0b143b into main Sep 16, 2026
8 checks passed
@fabenan-f
fabenan-f deleted the feat/agents-upsert-keys-rpc branch September 16, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants